You are here: Dev Guide > Getting Started In Code

Getting Started In Code

Initialization:  The MGC client software must be initialized.  All MGC software is initialized through the Platform Manager.  The Platform Manager is responsible for starting all of the managers and components associated with the MGC software.  This is run on both the MGC station and the MGC client application.  The Peripheral Station manager uses the MasterConfiguration.xml file to determine what managers are to be loaded.  At minimum, PlatformManager and DeviceManager must be configured to be installed.  Additional managers typically include:  DiagnosticsManager (used for tracing) and ObjectFactoryManager (allows 3rd party devices to be installed and run by the MGC software).  Technical details of MasterConfiguration file can be found in the MasterConfiguration.xsd file.

In Codeā€¦.

To Initialize the Platform Manager and Device Manager,

Add a reference to:

Ncr.As.PlatformManager.dll,

Ncr.As.Interfaces.PlatformManager.dll

Ncr.As.Interfaces.DeviceManagerInterfaces.dll

using Ncr.Managers.PlatformManager;

using Ncr.Managers.DeviceManager;

 

 

// Access the singleton instance of the PlatformManager

IPlatformManager PlatformManager = Ncr.Managers.PlatformManager.PlatformManager.Instance;

 

// Initialize the platform

string masterConfigurationFilePath = @"C:\Program Files (x86)\NCR\AdvancedStore\POS\Configuration\MasterConfiguration.xml" ;

string posClientInstanceId = "PosStation1";

 

PlatformManager.Initialize(masterConfigurationFilePath, posClientInstanceId);

 

 

// Access the DeviceManager

IDeviceManager deviceManager = PlatformManager.DeviceManager;